import request from '@/utils/request'

export function listCategory(query) {
  return request({
    url: '/api/category/list',
    method: 'get',
    params: query
  })
}

export function getCategory(CategoryId) {
  return request({
    url: '/api/category/' + CategoryId,
    method: 'get'
  })
}

export function saveOrUpdateCategory(data) {
  return request({
    url: '/api/category/saveOrUpdate',
    method: 'post',
    data: data
  })
}

export function delCategory(CategoryId) {
  return request({
    url: '/api/category/del/' + CategoryId,
    method: 'post'
  })
}
